package com.sitech.portal.system.action;

import com.sitech.ibnms.core.IPage;
import com.sitech.ibnms.core.JGridBaseAction;
import com.sitech.portal.system.service.ISysPostTimeService;

import java.util.Date;

/**
 * Created by Administrator on 2015/6/17.
 */
public class UserLoginReportAction extends JGridBaseAction {
    private ISysPostTimeService sysPostTimeService;

    private String beginTime;

    private String endTime;

    private String queryRule;

    private String loginId;


    public String loginListPage(){
        return SUCCESS;
    }

    public String loginReport() {
        this.setResult(sysPostTimeService.getPostTimeReport(beginTime, endTime, queryRule, this.getPageForm()));
        return SUCCESS;
    }

    public String nonLoginUser() {
        this.setResult(sysPostTimeService.getNonLoginUser(beginTime, endTime, queryRule, this.getPageForm()));
        return SUCCESS;
    }

    public String loginList(){

        try {
            this.setResult(sysPostTimeService.getPostTimeListByFilter(loginId,beginTime,endTime,queryRule,this.getPageForm()));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return SUCCESS;
    }

    public void setSysPostTimeService(ISysPostTimeService sysPostTimeService) {
        this.sysPostTimeService = sysPostTimeService;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public void setQueryRule(String queryRule) {
        this.queryRule = queryRule;
    }

    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public String getQueryRule() {
        return queryRule;
    }

    public String getLoginId() {
        return loginId;
    }
}
